package tr.edu.metu.is.mega.server.entity;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 * The persistent class for the submissionrevision database table.
 */
@Entity
public class Submissionrevision implements Serializable, tr.edu.metu.is.mega.server.core.BaseEntity {

    private static final long serialVersionUID = -4135068943219166171L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer pkid;

    private String filepath;

    private Timestamp submissiondate;

    private String submittedby;

    // bi-directional many-to-one association to Submission
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "fk_submission")
    private Submission submission;

    /**
     * Default constructor.
     */
    public Submissionrevision() {
    }

    /**
     * Returns pkid.
     * 
     * @return the pkid
     */
    @Override
    public Integer getPkid() {
        return pkid;
    }

    /**
     * Sets pkid value.
     * 
     * @param pkid the pkid to set
     */
    @Override
    public void setPkid(Integer pkid) {
        this.pkid = pkid;
    }

    /**
     * Returns filepath.
     * 
     * @return the filepath
     */
    public String getFilepath() {
        return filepath;
    }

    /**
     * Sets filepath value.
     * 
     * @param filepath the filepath to set
     */
    public void setFilepath(String filepath) {
        this.filepath = filepath;
    }

    /**
     * Returns submissiondate.
     * 
     * @return the submissiondate
     */
    public Timestamp getSubmissiondate() {
        return submissiondate;
    }

    /**
     * Sets submissiondate value.
     * 
     * @param submissiondate the submissiondate to set
     */
    public void setSubmissiondate(Timestamp submissiondate) {
        this.submissiondate = submissiondate;
    }

    /**
     * Returns submittedby.
     * 
     * @return the submittedby
     */
    public String getSubmittedby() {
        return submittedby;
    }

    /**
     * Sets submittedby value.
     * 
     * @param submittedby the submittedby to set
     */
    public void setSubmittedby(String submittedby) {
        this.submittedby = submittedby;
    }

    /**
     * Returns submission.
     * 
     * @return the submission
     */
    public Submission getSubmission() {
        return submission;
    }

    /**
     * Sets submission value.
     * 
     * @param submission the submission to set
     */
    public void setSubmission(Submission submission) {
        this.submission = submission;
    }

}
